<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="header.jsp" %>
<body>
<%@ include file="nav.jsp" %>
<div class="banner">
    <div class="bannerImg" id="bannerImg">
    	<c:forEach var="bannerInfo" items="${bannerInfoList}">
    		<c:if test="${bannerInfo.bannerType == 0}"><!-- 0 首页 -->
        		<div class="bannerCon" style="background:url(${bannerInfo.bannerImgUrl}) no-repeat center 0;"><!-- <a href="aboutus.html?about=6"></a>--></div>
        	</c:if>
        </c:forEach>
    </div>
    <div class="bannerNav">
    	<c:forEach var="bannerInfo" items="${bannerInfoList}" varStatus="status">
    		<c:if test="${bannerInfo.bannerType == 0}">
    			<span ${status.index == 0?"calss='active'":""}class="active"></span>
    		</c:if>
    	</c:forEach>
    </div>
    <div class="bannerNav1"><span class="pre"></span><span class="next"></span></div>
</div>

<!--<div class="box box_news clearfix">
    <div class="homeBox1 left ">
        <h2 class="homeTit"><img  alt="" src="${ctx}/resource/img/index/homeTit1.gif" /></h2>
        <p><img src="${ctx}/resource/img/index/home_news_01.jpg" /></p>
        <div class="homeCon1">岑融是一家专注于新兴产业的专业财富管理与投资管理的公司，致力于在全国范围内协助优秀的创业者，在帮助企业快速成长时，为投资者带来丰厚利润.....</div>
        <p><a class="text_org" href="${ctx}/index/abouts"><strong>MORE >></strong></a></p>
    </div>
    <div class="homeBox1 left">
        <h2 class="homeTit"><img  alt="" src="${ctx}/resource/img/index/homeTit2.gif" /></h2>
        <p><img src="${ctx}/resource/img/index/home_news_02.jpg" /></p>
        <ul class="homeCon1_list">
        	<c:forEach var="typicalCases" items="${typicalCasesList}" end="3">
            	<li><span>●</span><a>${typicalCases.typicalTitle}</a></li>
            </c:forEach>
        </ul>
        <p><a class="text_org" href="${ctx}/index/typical"><strong>MORE >></strong></a></p>
    </div>
    <div class="homeBox1 left ">
        <h2 class="homeTit"><img alt="" src="${ctx}/resource/img/index/homeTit3.gif" /></h2>
        <p><img src="${ctx}/resource/img/index/home_news_03.jpg" /></p>
        <div class="homeCon1">我们是一个创新包容、平等开放、机遇与挑战并存的团队，一个让能力得到发挥、充分展现自我的平台！让你兴奋的工作就在这里！</div>
        <p><a class="text_org" href="${ctx}/index/recruit"><strong>MORE >></strong></a></p>
    </div>
</div>-->

<!-- footer -->
<%@ include file="footer.jsp" %>
<script type="text/javascript">
	document.title = "德燊投资";//修改标题
	var t = i = count = 0;
	$(function(){	
		count = $('.bannerNav span').length;	
		$('.bannerNav span').hover(function(){
			clearInterval(t);
			var index = $('.bannerNav span').index(this);
			i = index;
			turnImg(i);
		},function(){
			t =  setInterval(turnAuto,5000);
		});
		t =  setInterval(turnAuto,5000);
		//上一页按钮
		$(".pre").click(function() {
			i -= 1;
			if(i == -1) {i = count - 1;}
			turnImg(i);
		});
	
		//下一页按钮
		$(".next").click(function() {
			i += 1;
			if(i == count) {i = 0;}
			turnImg(i);
		});
	});
	function turnImg(index){
		$('.bannerNav span').removeClass('active').eq(index).addClass('active');
		$('.bannerImg .bannerCon').eq(index).fadeIn(800).siblings('.bannerCon').fadeOut(200);
		//$('.bannerImg .bannerCon').fadeOut().eq(index).fadeIn();
	}
	function turnAuto(){		
		//i = i>=(count-1 ) ?  0 : i++;
		if(i >= count-1){
			i = 0;		
		} else {
			i++;		
		}
		turnImg(i);
	}
</script>
</body>

